package day04.work02;

public class Dog extends Animal {
    private int age;

    public Dog(){}
    public Dog(String name,int age){
        super(name);
        this.age=age;
    }

    public void move(){
        System.out.println("小狗喜欢摇尾巴");
    }

    @Override
    public void makeSound() {
        System.out.println("小狗汪汪叫");
    }
    @Override
    public String toString() {
        return "Dog [age=" + age + ", getName()=" + getName() + "]";
    }

    
    
}
